﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectDept.aspx.cs" Inherits="Portal.SelectDept" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <base target="_self"></base>
    <title>选择部门</title>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="../../js/common.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $().ready(function () {
            //alert(request("Type"));
            if (request("Type") == "31") {

                $(":checkbox").click(function () {
                   // alert($(this).val());
                    $(":checkbox").each(function () {
                      //  alert($(this).attr("checked"));
                        $(this).removeAttr("checked");
                    });
                    $(this).attr("checked", "checked");
                });
            }
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    <div style="width: 400px; height: 400px; overflow: scroll;">
                        <asp:TreeView ID="tvDept" runat="server" ShowCheckBoxes="Leaf,Parent" ShowExpandCollapse="true"
                            ShowLines="true" OnSelectedNodeChanged="tvDept_SelectedNodeChanged" OnTreeNodeCheckChanged="tvDept_TreeNodeCheckChanged"
                            PopulateNodesFromClient="true">
                            <SelectedNodeStyle Font-Bold="true" />
                        </asp:TreeView>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btn1" runat="server" Text="确 定" OnClick="btn1_Click" CssClass="btn btn-warning" />
                    <input type="button" id="btnClose" value="关闭" class="btn btn-warning" onclick="window.close();" />
                </td>
            </tr>
        </table>
    </div>
    <div>
    </div>
    <div style="display: none">
        <asp:TextBox ID="txtType" runat="server"></asp:TextBox>
    </div>
    </form>
</body>
</html>
